function dlgOpen(aTitle, aUrl, aWidth, aHeight)
{
  var lDialogArg = new Object;
  lDialogArg.title = aTitle;
  lDialogArg.url = aUrl;
  var lFeatures = "center: Yes; help: No; resizable: Yes; status: No; dialogWidth: " + aWidth + "px; dialogHeight: " + aHeight + "px;";
 var lRetval = window.showModalDialog(aUrl, lDialogArg, lFeatures);
  if (lRetval == null)
    return null;
  else
    return lRetval;
}


 
function dlgClose(aRetval)
{
  if (aRetval != null) {
    window.opener.returnValue = aRetval;
  }
  window.opener.close();
}

function dlgOpenWindow(aUrl, aName, aFeatures, aReplace)
{
  window.opener.open(aUrl, aName, aFeatures, aReplace);
}

function dlgOpen2(aTitle, aUrl, aWidth, aHeight)
{
  var lDialogArg = new Object;
  lDialogArg.title = aTitle;
  lDialogArg.url = aUrl;
  var lFeatures = "center: Yes; help: No; resizable: No; status: No; dialogWidth: " + aWidth + "px; dialogHeight: " + aHeight + "px;";
  var lRetval = window.showModalDialog(aUrl, window, lFeatures);
  if (lRetval == null)
    return null;
  else
    return lRetval;
}